// 引入二次封装好的axios
import request from '@/utils/request'

// 请求sku列表的接口  /admin/product/list/{page}/{limit}  需要携带参数，get请求
export const reqSkuInfoList = (page, limit) => request({ url: `/admin/product/list/${page}/${limit}`, method: 'get' })

// 上架的接口：/admin/product/onSale/{skuId}   需要携带参数，get请求
export const reqAdded = (skuId) => request({ url: `/admin/product/onSale/${skuId}`, method: 'get' })

// 下架的接口：/admin/product/cancelSale/{skuId} 需要携带参数，get请求
export const reqUnShelve = (skuId) => request({ url: `/admin/product/cancelSale/${skuId}`, method: 'get' })

// 查看某个sku详情的接口  /admin/product/getSkuById/{skuId}  需要携带参数，get请求
export const reqSkuInfo=(skuId)=>request({url:`/admin/product/getSkuById/${skuId}`,method:'get'})
// 删除某一个sku商品的接口
// /admin/product/deleteSku/{skuId}   需要携带参数，delete请求
export const reqDeltesku = (skuId) => request({ url: `/admin/product/deleteSku/${skuId}`, method: 'delete' })